#include <iostream>
#include <cstdio>
using namespace std;

int main(){
	int maxH,cnt=0,h;
	cin>>maxH;
	for(int i=1;i<=10;i++){
		cin>>h;
		if(maxH+30>=h){
			cnt++;
		}
	}
	cout<<cnt;
	return 0;
}
